//
//  UIColor+Extension.swift
//  DoctorEPlus
//
//  Created by 王林波 on 2020/10/27.
//

import Foundation
import UIKit

extension UIColor {
    func toImage(_ size: CGSize) -> UIImage {
        
        let rect = CGRect(origin: CGPoint(), size: size)
        
        UIGraphicsBeginImageContextWithOptions(rect.size, true, 0)
        
        let context: CGContext = UIGraphicsGetCurrentContext()!
        context.setFillColor(self.cgColor)
        context.fill(rect)
        
        let result = UIGraphicsGetImageFromCurrentImageContext()
        
        UIGraphicsEndImageContext()
        
        return result!
    }
    
    
    static func hexToColor (hexString: String) -> UIColor {
        return hexString.toHexColor(alpha: 1.0)
    }
    
    
    
    /******************************************************/
    static var color_999999: UIColor {
        get {
            return UIColor.hexToColor(hexString: "999999")
        }
    }
    static var color_FA793F: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FA793F")
        }
    }
    
    static var color_666666: UIColor {
        get {
            return UIColor.hexToColor(hexString: "666666")
        }
    }
    static var color_222222: UIColor {
        get {
            return UIColor.hexToColor(hexString: "222222")
        }
    }
    static var color_333333: UIColor {
        get {
            return UIColor.hexToColor(hexString: "333333")
        }
    }
    static var color_dddddd: UIColor {
        get {
            return UIColor.hexToColor(hexString: "dddddd")
        }
    }
    
    static var color_444444: UIColor {
        get {
            return UIColor.hexToColor(hexString: "444444")
        }
    }
    
    static var color_454545: UIColor {
        get {
            return UIColor.hexToColor(hexString: "454545")
        }
    }
    
    static var color_dbdbdb: UIColor {
        get {
            return UIColor.hexToColor(hexString: "dbdbdb")
        }
    }
    static var color_dadada: UIColor {
        get {
            return UIColor.hexToColor(hexString: "dadada")
        }
    }
    static var color_dfdfdf: UIColor {
        get {
            return UIColor.hexToColor(hexString: "dfdfdf")
        }
    }
    static var color_3d7cfc: UIColor {
        get {
            return UIColor.hexToColor(hexString: "3d7cfc")
        }
    }
    static var color_FFF6E6: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FFF6E6")
        }
    }

    static var color_F59A22: UIColor {
        get {
            return UIColor.hexToColor(hexString: "F59A22")
        }
    }

    
    static var color_D7F8F9: UIColor {
        get {
            return UIColor.hexToColor(hexString: "#D7F8F9")
        }
    }
    
    static var color_2867E7: UIColor {
        get {
            return UIColor.hexToColor(hexString: "2867E7")
        }
    }
    
    static var color_242424: UIColor {
        get {
            return UIColor.hexToColor(hexString: "242424")
        }
    }
    
    static var color_22AABA: UIColor {
        get {
            return UIColor.hexToColor(hexString: "#22AABA")
        }
    }
    
    static var color_eeeeee: UIColor {
        get {
            return UIColor.hexToColor(hexString: "eeeeee")
        }
    }
    
    static var color_cccccc: UIColor {
        get {
            return UIColor.hexToColor(hexString: "cccccc")
        }
    }
    static var color_3f3c4f: UIColor {
        get {
            return UIColor.hexToColor(hexString: "3F3C4F")
        }
    }
    static var color_bfbfbf: UIColor {
        get {
            return UIColor.hexToColor(hexString: "bfbfbf")
        }
    }
    
    static var color_f6f6f6: UIColor {
        get {
            return UIColor.hexToColor(hexString: "f6f6f6")
        }
    }
    static var color_fafafa: UIColor {
        get {
            return UIColor.hexToColor(hexString: "fafafa")
        }
    }
    static var color_f5f5f5: UIColor {
        get {
            return UIColor.hexToColor(hexString: "f5f5f5")
        }
    }
    
    static var color_ffd879: UIColor {
        get {
            return UIColor.hexToColor(hexString: "ffd879")
        }
    }
    static var color_FF4747: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FF4747")
        }
    }
    
    static var color_F4F7FF: UIColor {
        get {
            return UIColor.hexToColor(hexString: "F4F7FF")
        }
    }
    
    static var color_543823: UIColor {
        get {
            return UIColor.hexToColor(hexString: "543823")
        }
    }
    static var color_3B3B5A: UIColor {
        get {
            return UIColor.hexToColor(hexString: "3B3B5A")
        }
    }
    
    static var color_93C4FF: UIColor {
        get {
            return UIColor.hexToColor(hexString: "93C4FF")
        }
    }
    
    static var color_8BE09C: UIColor {
        get {
            return UIColor.hexToColor(hexString: "8BE09C")
        }
    }
    
    static var color_B0C5FE: UIColor {
        get {
            return UIColor.hexToColor(hexString: "B0C5FE")
        }
    }
    
    static var color_FFC473: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FFC473")
        }
    }

   
    static var color_89BDFF: UIColor {
        get {
            return UIColor.hexToColor(hexString: "89BDFF")
        }
    }
    
    static var color_f2f2f2: UIColor {
        get {
            return UIColor.hexToColor(hexString: "f2f2f2")
        }
    }
    static var color_eaeaea: UIColor {
        get {
            return UIColor.hexToColor(hexString: "eaeaea")
        }
    }
    static var color_ebf2ff: UIColor {
        get {
            return UIColor.hexToColor(hexString: "EBF2FF")
        }
    }
    static var color_EBA83F: UIColor {
        get {
            return UIColor.hexToColor(hexString: "EBA83F")
        }
    }
    
    static var color_24B63C: UIColor {
        get {
            return UIColor.hexToColor(hexString: "24B63C")
        }
    }
  
    
    static var color_e7efff: UIColor {
        get {
            return UIColor.hexToColor(hexString: "e7efff")
        }
    }
    static var color_afafaf: UIColor {
        get {
            return UIColor.hexToColor(hexString: "afafaf")
        }
    }
    static var color_efefef: UIColor {
        get {
            return UIColor.hexToColor(hexString: "efefef")
        }
    }
    static var color_FFEFEF: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FFEFEF")
        }
    }
    static var color_F67474: UIColor {
        get {
            return UIColor.hexToColor(hexString: "F67474")
        }
    }
  
    static var color_e6e6e6: UIColor {
        get {
            return UIColor.hexToColor(hexString: "e6e6e6")
        }
    }
    static var color_9ebefe: UIColor {
        get {
            return UIColor.hexToColor(hexString: "9ebefe")
        }
    }
    static var color_f2f4f8: UIColor {
        get {
            return UIColor.hexToColor(hexString: "f2f4f8")
        }
    }
    static var color_f8f8f8: UIColor {
        get {
            return UIColor.hexToColor(hexString: "f8f8f8")
        }
    }
    
    static var color_d8e5fe: UIColor {
        get {
            return UIColor.hexToColor(hexString: "d8e5fe")
        }
    }
    
    static var color_d3e3ff: UIColor {
        get {
            return UIColor.hexToColor(hexString: "d3e3ff")
        }
    }
    
    static var color_bad1ff: UIColor {
        get {
            return UIColor.hexToColor(hexString: "bad1ff")
        }
    }
    
    static var color_ffba25: UIColor {
        get {
            return UIColor.hexToColor(hexString: "ffba25")
        }
    }
    
    static var color_ff3b30: UIColor {
        get {
            return UIColor.hexToColor(hexString: "ff3b30")
        }
    }
    
    static var color_f1e1af: UIColor {
        get {
            return UIColor.hexToColor(hexString: "F7E1AF")
        }
    }
    static var color_e2c27d: UIColor {
        get {
            return UIColor.hexToColor(hexString: "E2C27D")
        }
    }
    
    static var color_ff9652: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FF9652")
        }
    }
    
    static var color_7c55eb: UIColor {
        get {
            return UIColor.hexToColor(hexString: "7C55EB")
        }
    }
    static var color_ff6e6e: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FF6E6E")
        }
    }
    
    static var color_f23b11: UIColor {
        get {
            return UIColor.hexToColor(hexString: "F23B11")
        }
    }
    
    static var color_ff7a19: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FF7A19")
        }
    }
    
    static var color_ffae00: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FFAE00")
        }
    }
    
    // MARK: **********************
    static var color_97949E: UIColor {
        get {
            return UIColor.hexToColor(hexString: "97949E")
        }
    }
    
    static var color_34CE98: UIColor {
        get {
            return UIColor.hexToColor(hexString: "34CE98")
        }
    }
    static var color_FFBF43: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FFBF43")
        }
    }
    static var color_FC352B: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FC352B")
        }
    }
    static var color_e7e7e7: UIColor {
        get {
            return UIColor.hexToColor(hexString: "e7e7e7")
        }
    }
    static var color_E2F8F0: UIColor {
        get {
            return UIColor.hexToColor(hexString: "E2F8F0")
        }
    }
    
    static var color_D43939: UIColor {
        get {
            return UIColor.hexToColor(hexString: "D43939")
        }
    }
    
    static var color_E0F5ED: UIColor {
        get {
            return UIColor.hexToColor(hexString: "E0F5ED")
        }
    }
    
    static var color_f4f4f4: UIColor {
        get {
            return UIColor.hexToColor(hexString: "f4f4f4")
        }
    }
    
    static var color_FFF9ED: UIColor {
        get {
            return UIColor.hexToColor(hexString: "FFF9ED")
        }
    }
    
    static var color_ADE6D2: UIColor {
        get {
            return UIColor.hexToColor(hexString: "ADE6D2")
        }
    }
    
    static var color_2D2F37: UIColor {
        get {
            return UIColor.hexToColor(hexString: "2D2F37")
        }
    }
    
    static var color_777777: UIColor {
        get {
            return UIColor.hexToColor(hexString: "777777")
        }
    }
    
    
    
}
